<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Document</title>
        <script src="https://cdn.jsdelivr.net/npm/vue@2.6.14"></script>
        <link rel="stylesheet" href="./index.css">
    </head>

    <body>
        <div id="app">
            <ul class="bgg">
                <li class="sphere"></li>
                <p class="text">亲爱滴~圣诞快乐</p>
            </ul>
            <ul class="tree">
                <li class="top-star"> </li>
                <li :class="{[con.li_class]:true}" v-for='(con,index) in contentList' :key='index'>
                    <ul :class="{[con.ul_class]:true}">
                        <li :class="{pts:true, [con.left_class]:true}" v-for='(item,index) in 8' :key='index'></li>
                        <li :class="{pts:true, [con.right_class]:true}" v-for='(item,index) in 7' :key='index'></li>
                    </ul>
                </li>
                <li class="stem">
                    <ul class="tree-stem">
                        <li class="stem"></li>
                        <li :class="{gift:true, ['g'+(giftIndex+1)]:true}" v-for='(giftItem,giftIndex) in 9' :key='giftIndex'></li>
                        <li class="shadow"></li>
                    </ul>
                </li>
            </ul>
            <ul class="toys">
                <li class="star"></li>
                <li :class="{ball:true, ['b'+(ballIndex+1)]:true}" v-for='(ballItem,ballIndex) in 20' :key='ballIndex'></li>
                <li :class="{light:true, ['l'+(lightIndex+1)]:true}" v-for='(lightItem,lightIndex) in 25' :key='lightIndex'></li>
            </ul>
        </div>
        <script>
            new Vue({
                el: '#app',
                data: {
                    contentList: [
                        {
                            li_class: 'top',
                            ul_class: 'tree-pts',
                            left_class: 'left',
                            right_class: 'right',
                        },
                        {
                            li_class: 'middle first',
                            ul_class: 'tree-pts',
                            left_class: 'left',
                            right_class: 'right',
                        },
                        {
                            li_class: 'middle second',
                            ul_class: 'tree-pts',
                            left_class: 'left',
                            right_class: 'right',
                        },
                        {
                            li_class: 'middle third',
                            ul_class: 'tree-pts',
                            left_class: 'left',
                            right_class: 'right',
                        },
                        {
                            li_class: 'bottom outer',
                            ul_class: 'tree-pts',
                            left_class: 'left',
                            right_class: 'right',
                        },
                    ],
                },
            })
        </script>
    </body>

</html>